package com.robot.dto;

import com.robot.bean.Employee;
import lombok.Data;
import org.mapstruct.factory.Mappers;

import java.util.Date;

/**
 * Created by duqingxiang on 17/5/4.
 */
@Data
public class EmployeeDTO {

    private long id;
    private String name;
    private Date date;


    public static void main(String[] args) {
        EmployeeMapper mapper = Mappers.getMapper(EmployeeMapper.class);

        Employee employee = Employee.builder().id(1).name("abc").build();
        EmployeeDTO dto = mapper.employeeToEmployeeDTO(employee);

        System.out.println(dto.toString());

    }

}
